﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CompareFormThread.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the CompareFormThread type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DbDiff.WinClient.Helper
{
    using System;
    using System.Windows.Forms;
    using Forms.Status;

    public class CompareFormThread : FormThread 
    {
        #region Constructors
        public CompareFormThread (frmCompareStatus form, Form parentForm, string title) 
            : base(form, parentForm)
        {
            ((frmCompareStatus)_form).Init(title, true);
        }
        #endregion Constructors

        public override void Hide() 
        {
            ((frmCompareStatus)_form).HideForm();
        }
        public void Init(string title) 
        {
            ((frmCompareStatus) _form).Init(title);
        }
        public void SetCompareStatus(string objectType, string objectName) 
        {
            ((frmCompareStatus) _form).SetCompareStatus(objectType, objectName);
        }
        public void SetCompareStatus(string info) 
        {
            ((frmCompareStatus) _form).SetCompareStatus(info);
        }

        public void StartCompare(string info)
        {
            ((frmCompareStatus) _form).StartCompare(info);
        }
        public void EndCompare(string info, string errorMessage)
        {
            ((frmCompareStatus) _form).EndCompare(info, errorMessage);
        }
        public void EndCompare(string info, Exception exception)
        {
            ((frmCompareStatus) _form).EndCompare(info, exception);
        }
    }
}